The subject matter disclosed herein relates generally to industrial controllers for controlling industrial processes or machinery, and in particular to a method of allocating and persisting memory in an industrial controller.
Industrial controllers are special purpose computers used for controlling factory automation and the like. The control program executed by the industrial controller is normally highly customized to a particular control application. Special control languages, such as “relay ladder logic” are normally used to facilitate programming of the device. Under the direction of the stored programs, a processor of the industrial controller examines a series of inputs reflecting the status of a controlled process. The control program uses the series of inputs to set or reset internal states within the processor. The combination of inputs and internal states are used to set outputs affecting the controlled process.
Industrial controllers often operate in environments where unexpected power interruptions may occur. For example, an operator or maintenance personnel may enter a restricted area or the controlled process, or another controlled process operating nearby may experience a fault condition, resulting in the power being removed from the controller. However, a power interruption may result in significant costs associated with lost production or potential complications of resetting a process. Consequently, the ability of the controller to quickly resume control of the process after a power loss can result in significant cost savings.
Developments in Random Access Memory (RAM) have resulted in higher density, lower power memory with an improved performance and reduced cost. As a result, significant increases in storage capacity and reductions in cost of RAM have allowed industrial controllers to exploit algorithms and approaches that utilized greater amounts of memory to improve performance, increase flexibility, and simplify development. However, RAM is primarily volatile memory, retaining its contents only as long as power is applied. In order to quickly resume control of a process after power loss, it is necessary to retain an image of the status of the process prior to losing power. Consequently, it is necessary to develop methods to capture the status of the processor in RAM and store it to non-volatile memory in the event of a power loss.
In order to capture the status of the processor from RAM, data is copied from RAM to non-volatile memory when a power loss is detected. However, only a small amount of time exists during which a processor may copy data to nonvolatile memory between detecting a drop in voltage level indicative of a power loss and when the voltage level becomes too low to write any further data to the non-volatile memory. Consequently, a limited amount of RAM may be transferred to non-volatile memory when power is lost.
Presently, industrial controllers attempt to overcome this limitation either by providing battery back-up to the RAM, such that the image of the controlled process remains in RAM through a power cycle or by providing a battery or capacitive source to temporarily extend the period of time during which the processor may transfer data from RAM to non-volatile memory.
However, battery-backed RAM and battery ride through systems both have drawbacks. Many industrial applications prohibit the use of either battery back-up or battery ride through systems. In addition, the batteries provide extra initial and maintenance expense to the controller. Capacitive storage devices having sufficient capacity to temporarily power the controller also add size and expense to the control system. In addition, controllers are now expected to retain significant amounts of information, including symbolic access to data and historical information, such as alarms, faults, or other events. Controllers also execute increasingly complex algorithms and control programs, requiring an increasing quantity of data to be persisted.
Thus, it would be desirable to offer a method to persist sufficient data in a controller to meet the growing requirements of industrial controllers without the additional size and expense of battery or capacitive storage systems.